﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Http;

namespace CookServer
{
    class CookServer
    {
        static void Main(string[] args)
        {
            Console.WriteLine("******* CookServer started! *****");
            Console.WriteLine("Press Enter to quit...");

            // register a new channel
            HttpChannel channel = new HttpChannel(32469);
            ChannelServices.RegisterChannel(channel);

            // register a WKO type, use Singleton to active
            RemotingConfiguration.RegisterWellKnownServiceType(
                    typeof(DataAccess.DataAccess), "DataAccess.soap",
                    WellKnownObjectMode.Singleton
                );
            Console.ReadLine();
        }
    }
}
